package com.easyaccount.dao;

import com.easyaccount.model.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MenuMapper {
    int deleteByPrimaryKey(Integer menuId);

    int insert(Menu record);

    int insertSelective(Menu record);

    Menu selectByPrimaryKey(Integer menuId);

    List<Menu> selectByPrimaryKeys(List<Integer> menuIds);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    List<Menu> selectByName(@Param("start") int start, @Param("size") int size, @Param("menuName") String menuName);

    List<Menu> selectAll();

    int selectByNameCount(@Param("menuName") String menuName);

    int selectByIdAndNameCount(Menu menu);

    List<Menu> selectByParentId(@Param("parentId") Integer parentId);
}